package com.zy.chat.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zy.chat.entity.GroupMessages;
import com.zy.chat.entity.SingleMessages;
import com.zy.chat.mapper.GroupMessageMapper;
import com.zy.chat.mapper.MessageMapper;
import com.zy.chat.service.SaveGroupMessageService;
import com.zy.chat.service.SaveMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class SaveGroupMessageServiceImpl extends ServiceImpl<GroupMessageMapper, GroupMessages> implements SaveGroupMessageService {


    @Autowired
    private GroupMessageMapper groupMessageMapper;
    @Override
    public void save(String groupname, String fromuser, String time, String content, String type) {
        GroupMessages groupMessages = new GroupMessages();
        groupMessages.setGroupName(groupname);
        groupMessages.setFromUser(fromuser);
        groupMessages.setContent(content);
        groupMessages.setSendTime(time);
        groupMessages.setType(type);
        groupMessageMapper.insert(groupMessages);

    }
}
